package cn.wolfcode.shop.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Getter
@Setter
public class Catalog extends BaseDomain{

    private static final long serialVersionUID=1L;

    private String name;

    private String code;

    private Integer sort;

    private Long pId;

    private Integer isParent;

    private Integer propertyCount;

    public String getJsonData(){
        Map map = new HashMap();
        map.put("id",getId());
        map.put("name",this.name);
        map.put("code",this.code);
        map.put("sort",this.sort);
        map.put("pId",this.pId);
        map.put("isParent",this.isParent);
        return JSON.toJSONString(map);
    }
}